﻿<!-- "script/apps/Aries/Inventory/Pages/KeepWorkCoinNoEnough.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>KeepWorkCoinNoEnough, by yangguiyi, 2020/8/6</title>
</head>
<body>
<pe:mcml>
<script type="text/npl" src="KeepWorkCoinNoEnough.lua" refresh="true"><![CDATA[
local pageCtrl = document:GetPageCtrl();
local KeepWorkCoinNoEnough = MyCompany.Aries.Creator.Game.KeepWork.KeepWorkCoinNoEnough
local KeepworkServiceSession = NPL.load("(gl)Mod/WorldShare/service/KeepworkService/Session.lua")
local ParacraftLearningRoomDailyPage = NPL.load("(gl)script/apps/Aries/Creator/Game/Tasks/ParacraftLearningRoom/ParacraftLearningRoomDailyPage.lua");
local WorldList = NPL.load("./WorldList")
local LoginModal = NPL.load("(gl)Mod/WorldShare/cellar/LoginModal/LoginModal.lua")

local item_data = pageCtrl:GetRequestParam("item_data");
KeepWorkCoinNoEnough.OnInit(item_data)

function OnCancel()
    pageCtrl:CloseWindow();
end

function OnOK()
    KeepWorkCoinNoEnough.OnOK()
end

function getLeftBean()
    return KeepWorkCoinNoEnough.getLeftBean()
end

function OnDailyCheck()
        if(KeepworkServiceSession:IsSignedIn())then
            ParacraftLearningRoomDailyPage.DoCheckin();
            return
        end
        LoginModal:CheckSignedIn(L"请先登录", function(result)
        if result == true then
            Mod.WorldShare.Utils.SetTimeOut(function()
                if result then
                    WorldList:RefreshCurrentServerList()
                    local ParacraftLearningRoomDailyPage = NPL.load("(gl)script/apps/Aries/Creator/Game/Tasks/ParacraftLearningRoom/ParacraftLearningRoomDailyPage.lua");
                    ParacraftLearningRoomDailyPage.DoCheckin();
                end
            end, 500)
        end
    end)
end

function OnLearningLand()
        if(KeepworkServiceSession:IsSignedIn())then
            ParacraftLearningRoomDailyPage.OnLearningLand();
            return
        end
        LoginModal:CheckSignedIn(L"请先登录", function(result)
        if result == true then
            Mod.WorldShare.Utils.SetTimeOut(function()
                if result then
                    WorldList:RefreshCurrentServerList()
                    local ParacraftLearningRoomDailyPage = NPL.load("(gl)script/apps/Aries/Creator/Game/Tasks/ParacraftLearningRoom/ParacraftLearningRoomDailyPage.lua");
                    ParacraftLearningRoomDailyPage.OnLearningLand();
                end
            end, 300)
        end
    end)
end

function ClosePage()
    pageCtrl:CloseWindow();
end

]]></script>
<aries:window mode="thin" width="400" height="216" title='<%=L"提示"%>' onclose="ClosePage">
    <div style="width:400;margin-left:21px;margin-top:39px;">
        <div style="color:#f0f0f0"><%="知识币余额不足，请充值！" %></div>
        <div style="float:left; margin-top:13px; color:#999999; font-size:14px;"><%="你的知识币余额: " %></div>
        <div style="float:left;margin-top:18px;margin-left:3px;float:left;width:16;height:16;background:url(Texture/Aries/Creator/keepwork/Mall/icon_coin_32bits.png#0 0 16 16:0 0 0 0);"></div> 
        <div style="float:left;margin-left:0px; margin-top:13px; color:#ffc900; font-size:14px;"><%=getLeftBean() %></div>
    </div>
    <div style="width:400px;height:48px;margin-top:42px;">
        <pe:goalpointer listen="purchase_confirm" style="width:90px;height:32px;"></pe:goalpointer>
        <input type="button" style="margin-left:90px;width:90px;height:32px;" onclick="OnCancel()" class="mc_big_button" value="下次再说"/>
        <input type="button" style="margin-left:20px;width:90px;height:32px;" onclick="OnOK()" class="mc_big_button" value="马上充值"/>
    </div>
</aries:window>
</pe:mcml> 
</body>
</html>